package com.ruoyi.web.controller.activemq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName QueueConsumerListener
 * @Description TODO
 * @Author luguanqing
 * @Date 2021/6/22 10:23
 * @Version 1.0
 */
@Component
public class QueueConsumerListener {

    //queue模式消费者
    @JmsListener(destination = "${spring.activemq.queue-name}", containerFactory="queueListener")
    public void readActiveQueue(String message){
        System.out.println("queue接收到" + message);
    }
}
